﻿<phone:PhoneApplicationPage 
    x:Class="OSChina.DetailPage2"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:tileEffect="clr-namespace:WP7_ControlsLib.Controls;assembly=WP7_ControlsLib"
    tileEffect:TiltEffect.IsTiltEnabled="True"
    xmlns:MyControl="clr-namespace:OSChina.Controls"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    Style="{StaticResource TransitionPageStyle}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="White">
        <!--枢轴控件-->
        <controls:Pivot x:Name="pivot">
            <!--枢轴项一-->
            <controls:PivotItem x:Name="pivotDetail">
                <controls:PivotItem.Header>
                    <TextBlock x:Name="lblDocumentTitle" Foreground="{StaticResource PhoneAccentBrush}" FontSize="58"/>
                </controls:PivotItem.Header>
                <phone:WebBrowser Name="browser" VerticalAlignment="Top" Height="631" Margin="0,-18,0,0"/>
            </controls:PivotItem>

            <!--枢轴项二-->
            <controls:PivotItem x:Name="pivotComment" Margin="4,10,8,0">
                <controls:PivotItem.Header>
                    <TextBlock x:Name="lblCommentCount" Foreground="{StaticResource PhoneAccentBrush}"  FontSize="58"/>
                </controls:PivotItem.Header>
                <MyControl:CommentListControl x:Name="commentListControl" Height="631" VerticalAlignment="Top" Margin="0,0,0,0" />
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--演示 ApplicationBar 用法的示例代码-->
    <phone:PhoneApplicationPage.Resources>
        <!-- 新闻,问答,博客 且 收藏 -->
        <shell:ApplicationBar x:Key="bar_news_favorite" IsVisible="True" IsMenuEnabled="True" Mode="Default"  Opacity="0.9"  ForegroundColor="Black"  BackgroundColor="White">
            <shell:ApplicationBarIconButton x:Name="icon_Pin1" IconUri="/Resource/pushpin.png" Text="订到桌面" Click="icon_Pin1_Click" />
            <shell:ApplicationBarIconButton x:Name="icon_Favorite1" IconUri="/Resource/appbar.favs.addto.rest.png" Text="收藏此文" Click="icon_Favorite1_Click" />
            <shell:ApplicationBarIconButton x:Name="icon_Refresh1" IconUri="/Resource/appbar.refresh.rest.png" Text="刷新评论" Click="icon_Refresh_Click"/>
            <shell:ApplicationBarIconButton x:Name="icon_Comment1" IconUri="/Resource/appbar_publish_comment.png" Text="发表评论" Click="icon_Comment1_Click" />
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem_ShareSina1" Text="新浪微博分享" Click="menuItem_ShareSina1_Click" />
                <shell:ApplicationBarMenuItem x:Name="menuItem_ShareQQ1" Text="腾讯微博分享" Click="menuItem_ShareQQ1_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>

        <!-- 新闻,问答,博客 且 收藏 -->
        <shell:ApplicationBar x:Key="bar_news_nofavorite" IsVisible="True" IsMenuEnabled="True" Mode="Default"  Opacity="0.9"  ForegroundColor="Black"  BackgroundColor="White">
            <shell:ApplicationBarIconButton x:Name="icon_Pin2" IconUri="/Resource/pushpin.png" Text="订到桌面" Click="icon_Pin1_Click" />
            <shell:ApplicationBarIconButton x:Name="icon_NoFavorite2" IconUri="/Resource/ifanr_favs_remove.png" Text="取消收藏" Click="icon_NoFavorite2_Click" />
            <shell:ApplicationBarIconButton x:Name="icon_Refresh2" IconUri="/Resource/appbar.refresh.rest.png" Text="刷新评论" Click="icon_Refresh_Click"/>
            <shell:ApplicationBarIconButton x:Name="icon_Comment2" IconUri="/Resource/appbar_publish_comment.png" Text="发表评论" Click="icon_Comment1_Click" />
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem_ShareSina2" Text="新浪微博分享" Click="menuItem_ShareSina1_Click"  />
                <shell:ApplicationBarMenuItem x:Name="menuItem_ShareQQ2" Text="腾讯微博分享" Click="menuItem_ShareQQ1_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>

        <!-- 动弹专用 没分享 也没收藏也没固定 也没查看原文 -->
        <shell:ApplicationBar x:Key="bar_tweet" IsVisible="True" IsMenuEnabled="True" Mode="Default"  Opacity="0.9"  ForegroundColor="Black"  BackgroundColor="White">
            <shell:ApplicationBarIconButton x:Name="icon_Refresh3" IconUri="/Resource/appbar.refresh.rest.png" Text="刷新评论" Click="icon_Refresh_Click"/>
            <shell:ApplicationBarIconButton x:Name="icon_Comment3" IconUri="/Resource/appbar_publish_comment.png" Text="发表评论" Click="icon_Comment1_Click" />
        </shell:ApplicationBar>

        <!-- 软件专用的两个，分为收藏与取消收藏 -->
        <shell:ApplicationBar x:Key="bar_software_favorite" IsVisible="True" IsMenuEnabled="True" Mode="Minimized"  Opacity="0.9" ForegroundColor="Black"  BackgroundColor="White">
            <shell:ApplicationBarIconButton x:Name="icon_Favorite4" IconUri="/Resource/appbar.favs.addto.rest.png" Text="收藏软件" Click="icon_Favorite1_Click" />
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="bar_software_nofavorite" IsVisible="True" IsMenuEnabled="True" Mode="Minimized"  Opacity="0.9" ForegroundColor="Black"  BackgroundColor="White">
            <shell:ApplicationBarIconButton x:Name="icon_NoFavorite5" IconUri="/Resource/ifanr_favs_remove.png" Text="取消收藏" Click="icon_NoFavorite2_Click" />
        </shell:ApplicationBar>

    </phone:PhoneApplicationPage.Resources>

</phone:PhoneApplicationPage>